package org.appmon.core.config;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

import com.google.common.collect.ArrayListMultimap;
import com.google.common.collect.Multimap;

public class PackageBaseInfo {

	private static PackageBaseInfo packageBaseInfo;
	
	
	private  Map<String, Object> packageToInclude = new ConcurrentHashMap<String,Object>();
//	private  Map<String, Object> classToInclude   = new ConcurrentHashMap<String,Object>();
	public Multimap<String, Object> classToInclude = ArrayListMultimap.create();
	
	
	
	private PackageBaseInfo() {
		
	}
	
	 public static PackageBaseInfo getInstance(){
	        if(packageBaseInfo == null){
	        	synchronized (PackageBaseInfo.class) {
		        	if(packageBaseInfo == null){
		        		packageBaseInfo = new PackageBaseInfo();
		        	}
	        	}
	        }
	        return packageBaseInfo;
	    }
	 
	
	
	public  Map<String, Object> getPackageToInclude() {
		System.out.println("Havoc");
		return packageToInclude;
	}
	
	public  void setPackageToInclude(String name , BehaviourProperties behaviourProperties) {		
		System.out.println("Ivoke setPackageToInclude");
		packageToInclude.put(name,behaviourProperties);
	}
	public  Multimap<String, Object> getClassToInclude() {
		 System.out.println("InM");
		return classToInclude;
	}
	public  void setClassToInclude(String name , BehaviourProperties behaviourProperties) {
		System.out.println("boom : "+ name+behaviourProperties.hashCode());
		classToInclude.put(name,behaviourProperties);
	}
	
	public void setCounter(Object obj){
	
		System.out.println("setCounter() set counter to : " + obj.hashCode());
	}
	
}
